import axios from "../model/axios";
import api from "../model/api";

export const userRegister = (data: any) => {
    return axios({
        method: "post",
        url: api.mine.register,
        data
    })
}
export const userLogin = (data: any) => {
    return axios({
        method: "post",
        url: api.mine.login,
        data
    })
}
export const getInfo = () => {
    return axios({
        method: "get",
        url: api.mine.getInfo,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }

    })
}

export const upload = (data: any) => {
    return axios({
        method: "post",
        url: '/prod-api/common/upload',
        data,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }

    })
}

export const changeUserInfo = (data: any) => {
    return axios({
        method: "put",
        url: '/prod-api/api/common/user',
        headers: {
            "Authorization": window.localStorage.getItem("token")
        },
        data

    })
}

